package com.malex.mxtracker.action;

import org.apache.wicket.markup.html.WebPage;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

/**
 * @author Manusovich Alexander
 */
public class ActionResult {
    private List<String> report;
    private WebPage responsePage;
    private Map<String, String> pesponseParams;

    public ActionResult(String report) {
        setReport(new ArrayList<String>());
        getReport().add(report);
    }

    public ActionResult(final List<String> report) {
        this.report = report;
    }

    public ActionResult() {
    }

    public List<String> getReport() {
        return report;
    }

    public void setReport(final List<String> report) {
        this.report = report;
    }

    public WebPage getResponsePage() {
        return responsePage;
    }

    public void setResponsePage(final WebPage responsePage) {
        this.responsePage = responsePage;
    }

    public Map<String, String> getPesponseParams() {
        if (pesponseParams == null) {
            pesponseParams = new HashMap<String, String>();
        }
        return pesponseParams;
    }

    public void setPesponseParams(final Map<String, String> pesponseParams) {
        this.pesponseParams = pesponseParams;
    }
}
